1. Field of the Invention
The present invention relates to an image data transfer system in which an imaging apparatus and a communication apparatus are connected through a network. Moreover, the present invention relates to an imaging apparatus, a communication apparatus, a method of generating an image data file and a computer program for implementing the same.
2. Description of the Related Art
USB (Universal Serial Bus Protocol is a well-known digital hardware interface suited to transfer video data between devices. For instance, the USB protocol is now widely used in computers and imaging apparatuses as an interface for attaching peripheral devices.
The USB specification (protocol) has a synchronous transfer mode called isochronous to guarantee real time transfer of video data. In the isochronous mode, a host controller transmits a synchronous signal called start of frame (SOF) to each device connected to the host controller. When the device transmits video data on a bus, the device synchronizes with the SOF and enables guaranteeing the real time transmission of video data.
In the isochronous transfer mode, in order to transmit video data, devices are required to obtain a bandwidth used for transmission. Each device notifies a host controller by descriptors of an alternate setting which indicates the bandwidth necessary for the isochronous data transfer and the host controller selects the alternate settings by sending a Set-Interface request to each device, thus, the bandwidth is assigned.
FIG. 11 is a schematic illustration of a structure of a descriptor stored in a device used in the isochronous transfer of video data. A device descriptor 1101 notifies a vendor ID, a product ID or the like. A configuration descriptor 1102 notifies a configuration available in the device. A descriptor 1103 indicates an alternate setting 0 of an interface #1 used in the configuration 1102. An endpoint descriptor 1104 is used in the interface descriptor 1103 where a Max Payload which indicates a bandwidth in the isochronous transfer type is 0. An interface descriptor 1105 indicates an alternate setting 1 of the interface #1. An endpoint descriptor 1106 is used when the interface #1 is selected as the alternate setting 1 where a Max Payload which indicates a bandwidth in the isochronous transfer type is 512. Accordingly, in response to a Set-Interface request shown in FIG. 12, the alternate setting 1 of the interface #1 is selected and the data transfer of 512 bytes per SOF cycle (in the USB full-speed, 1 ms, and in the high-speed, 125 μs) is guaranteed, and the device that stores the descriptor can transfer video data in the isochronous transfer.
The USB specification has no USB-required structure on the data content in the isochronous transfer, so that any kind of data can be transferred. That is, each device needs to communicate with each other on a data format to be used. As to stream data formats used in the isochronous transfer, it is possible to notify a format to be used to a destination host controller by descriptors.
FIG. 13 illustrates an example of a descriptor for notifying a stream format to be transmitted to a host controller. The reference numeral 1301 represents a descriptor length. The reference numerals 1302 and 1303 indicate types of the descriptor, that is, the descriptor that notifies the stream format. Identifiers 1304 and 1305 represent the stream format to be transmitted as the isochronous data. The host controller reads the values of the identifiers, recognizes the stream format to be transmitted from the device which stores the descriptor shown in FIG. 13, and can process the received stream data.
FIG. 14 illustrates a data flow in a case of sending video data on USB. A host controller obtains a descriptor indicating a stream format from a device by a Get-Descriptor (1401), and changes an alternate setting to 1 by a Set-Interface (1402). Then, the host controller transmits In Token packets (1403 to 1405) to the device in response to each SOF. If the device has data to transmit, the device transmits actual isochronous data (1406 to 1408) after receiving the In Token packets.
FIG. 15 illustrates a time-series data flow over USB. A SOF (1501) is transmitted every 1 ms (125 μs in the high-speed), and similarly, an In Token (1502) is transmitted from a host controller to an isochronous endpoint of a device. When the device has data to transmit following the In Token (1502), the device transmits a data packet (1503) via the isochronous endpoint. Although the device can transmit data in response to In Tokens every cycle, if it is not possible to transmit the data at 1504, the device may not transmit the data and may transmit the data at the next cycle (See the Universal Serial Bus Specification Revision 1.1, Sep. 23, 1998 and the Universal Serial Bus Specification Revision 2.0, Apr. 27, 2000).
In order to transfer data in real time by USB interfaces, a bandwidth has to be reserved for a bus that transfers data so that the real time data transfer is guaranteed. Referring to FIG. 16, as described above, in a case of USB interfaces, a bandwidth is guaranteed by a Max Payload that is set to an endpoint 1604. The endpoint has attributes of the isochronous transfer associated with a USB interface 1602 from a device 1601. In the example shown in FIG. 16, when an alternate setting 1603 of the interface 1602 is selected by a Set-Interface standard request, the Max Payload of an endpoint 1605 is set to 512, and data can be transferred up to 512 bytes per SOF to a host controller 1607 via the endpoint 1605. In that case, the data of up to 512 bytes can be transferred from a pipe 1606 of the endpoint 1605. In a case where the interface 1602 is set to the alternate setting 0 instead of the alternate setting 1 (1603) by the Set-Interface standard request, the data transfer is not possible. However, since no bus bandwidth is reserved, bandwidths available for any other devices increase.
One scenario is a case where a personal computer (PC) serving as a host controller is connected to an imaging apparatus by a USB interface and an application for displaying camera images (images being captured) taken by the imaging apparatus is launched, the camera images have to be displayed. Referring to FIG. 17, after the connection between the PC and the imaging apparatus has been established, the PC issues a Get-Descriptor request to the imaging apparatus so as to obtain descriptor information about the imaging apparatus at step S1701.
At step S1702, when the request is received, the imaging apparatus transmits the descriptor information to the PC. Actually, the Get-Descriptor request is issued in accordance with the descriptor types such as a device, and a configuration. After obtaining all of the descriptor information, a Set-Configuration is issued so as to select an arbitrary configuration and make setting. Since conventional devices have one configuration, a default configuration is to be selected at step S1703.
At step S1704, in a case where the target imaging apparatus has an interface for streaming, an Alternate Setting 0 of the Set-Interface is issued and setting is made so as not to transfer the streaming. When a PC application 1700 is activated that displays the camera images captured by the imaging apparatus, an Alternate Setting 1 of the Set-interface is issued by the PC application to the imaging apparatus to display the streaming. Then the PC application requests transmission of streaming to the imaging apparatus at step S1705.
Upon receiving the request, the imaging apparatus transmits an Ack at step S1706 and at step S1707, real time streaming data is transferred in accordance with the streaming format set by the Alternate setting 1. The transferred streaming data is stored as a file by the PC application.
Conventional high-performance video cameras, are equipped with a function of arbitrarily changing parameters for image setting such as gamma, hue, and skin detail and store the changed parameters.
Although the parameters for image setting can be changed according to scenes, such parameters are not stored in the conventional video cameras. Further, conventional video cameras cannot store the data which associate video data files generated during image capturing with image setting parameters synchronized with video data, that is, image setting parameters generated during image capturing.